package org.kiwi.data;

/**
 * Created by jack on 16/12/17.
 */
public class DbShardingStrategyHolder {

    private static final ThreadLocal<String> DB_GROUP_NAME = new ThreadLocal<>();

    public static String getDbGroupName() {
        return DB_GROUP_NAME.get();
    }

    public static void setDbGroupName(String dbGroupName) {
        DB_GROUP_NAME.set(dbGroupName);
    }

    public static void clear() {
        DB_GROUP_NAME.remove();
    }
}
